package com.example.springbootdemo.strategy.optimizeifelse.strategy;

import com.example.springbootdemo.AccountType;

/**
 * @author ：cici
 * @date ：Created in 2019/3/23 15:07
 */
public class Client {


    public static void main(String[] args) {

        UserType type = UserType.AGENT;
//        doMethod(AccountType.AGENT);
        if (type.equals(UserType.AGENT)){
            System.out.println("UserType.AGENT");
        }else if(type.equals(UserType.ADMIN)){
            System.out.println("UserType.ADMIN");
        }else if (type.equals(UserType.WORKER)){
            System.out.println("UserType.WORKER");
        }


        Context context = new Context();
        context.doSomething(type.getValue());

    }
}
